import {
	listIdc
} from '@/api/idc'


const store = {
	state: {
		idcOptions: [],
	},
	getters: {
		getIdcOptions(state) {
			return state.idcOptions
		}
	},
	mutations: {
		UPDATE_IDC_OPTIONS(state, data) {
			// const t = {
			// 	"label": "全部选择",
			// 	"value": "",
			// }
			// data.splice(0,0,t);
			state.idcOptions = data
		}
	},
	actions: {
		setIdcOptions({
			commit
		}) {
			listIdc()
				.then((response => {
					commit('UPDATE_IDC_OPTIONS', response)
				}))
		}
	}
}


export default store
